﻿<%@ Control Language="C#" AutoEventWireup="true" EnableViewState="false" CodeBehind="News.ascx.cs"
    Inherits="ZF.WS.UserControls.Index.News" %>
<div class="ct1 content">
    <div class="  fl_" style="width: 280px">
        <div class="board mt10_  ">
            <dl>
                <dt><a href="/news/list.aspx?type=<%=HttpUtility.UrlEncode("特别关注") %>">特别关注</a></dt>
                <dd  style="margin-top:-8px"  >
   <iframe src="/news/banner.aspx" id="fx" style="width: 280px;
                                    height: 237px" frameborder="no" border="0" marginwidth="0" scrolling="no" marginheight="0"
                                    allowtransparency="yes"></iframe>
                     




                </dd>
            </dl>
        </div>
         
        <style>
            .sitenew li { line-height: 26px; height: 26px; text-align: left; background: url(/image/bp.gif) no-repeat 5px 10px; padding-left: 15px; width: 260px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
        </style>
        <div class="b1 w100_ mt5_ sitenew">
            <ul>
                <zf:ListView runat="server" ID="lvSiteNew">
                    <LayoutTemplate>
                        <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                        </zf:PlaceHolder>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <li><a href="/news/index.aspx?id=<%# Eval("NewsId")%>">
                            <%# Eval("Title") %></a></li>
                    </ItemTemplate>
                </zf:ListView>
            </ul>
        </div>
    </div>
    <div class="board news mt10_ ml10_ fl_  " style="width: 424px">
        <dl>
            <dt>
                <zf:ListView ID="lvTitle" runat="server">
                    <LayoutTemplate>
                        <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                        </zf:PlaceHolder>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <a href="/news/list.aspx?type=<%# HttpUtility.UrlEncode(string.Concat( Eval("Key"))) %>"
                            bind="new<%# Container.DataItemIndex %>" class="<%# Container.DataItemIndex==0?"active":""%> slide">
                            <%#  Eval("Key")%></a>
                    </ItemTemplate>
                </zf:ListView>
            </dt>
            <zf:ListView runat="server" ID="lvNews">
                <LayoutTemplate>
                    <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                    </zf:PlaceHolder>
                </LayoutTemplate>
                <ItemTemplate>
                    <dd class="slide new<%# Container.DataItemIndex %> <%# Container.DataItemIndex==0?"":"dn_"%>">
                        <ul>
                            <zf:ListView runat="server" DataSource='<%#Eval("Value") %>'>
                                <LayoutTemplate>
                                    <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                                    </zf:PlaceHolder>
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <li class="<%# Container.DataItemIndex==0?"frist":"" %>"><a href="/news/index.aspx?id=<%# Eval("NewsId")%>">
                                        <%# string.Concat(Eval("Title")) %></a> <span>[<%# ((DateTime)Eval("AddTime")).Month %>-<%# ((DateTime)Eval("AddTime")).Day %>]</span>
                                    </li>
                                </ItemTemplate>
                            </zf:ListView>
                        </ul>
                    </dd>
                </ItemTemplate>
            </zf:ListView>
        </dl>
    </div>
    <div class="lrcontent ml10_ mt10_">
        <div class="board lrsearch fysearch">
            <dl>
                <dt><span>房源搜索</span> </dt>
                <dd>
                    <% var sp = new ZF.WS.house.Search(); %>
                    <table class="w100_ ">
                        <tr class="dt">
                            <td class='t'>
                                房源类型:
                            </td>
                            <td class='c'>
                                <select>
                                    <option value="1">出租房信息</option>
                                    <option value="3">出售二手房信息</option>
                                    <option value="4">出售一手房信息</option>
                                </select>
                            </td>
                        </tr>

                        <script>
                            var fyareajson = $.evalJSON('<%=sp.AreaChilds.JsonConvert() %>');
                        </script>

                        <tr class="">
                            <td class='t'>
                                区域:
                            </td>
                            <td class='c'>
                                <select class=" area1">
                                    <option value='0'>不 限</option>
                                </select>
                            </td>
                        </tr>
                        <tr class="">
                            <td class='t'>
                                商圈:
                            </td>
                            <td class='c'>
                                <select class=" area2">
                                    <option value='0'>不 限</option>
                                </select>
                            </td>
                        </tr>

                        <script>
                            var fysearch = $(".fysearch");
                            var area1 = fysearch.find(".area1")
                            $(fyareajson).each(function() {
                                area1.append(String.format("<option value='{0}'>{1}</option>", this.Id, this.Name));
                            });
                            $(function() {
                                
                            

                                fysearch.find(".area1").change(function() {

                                    var selId = this.value;
                                    var area2 = fysearch.find(".area2");
                                    area2.find("option").remove();
                                    area2.append("<option value='0'>不 限</option>");

                                    var area1json = null;
                                    $(fyareajson).each(function() {
                                        if (this.Id + "" == selId) {
                                            area1json = this;
                                            return false;
                                        }
                                    });
                                    if (area1json != null) {
                                        $(area1json.Childs).each(function() {
                                            area2.append(String.format("<option value='{0}'>{1}</option>", this.Id, this.Name));
                                        });

                                    }
                                });
                            });
                        
                        </script>

                        <tr class="zfp">
                            <td class='t'>
                                价&nbsp;&nbsp;&nbsp;&nbsp;格:
                            </td>
                            <td class='c'>
                                <select class="">
                                    <option>不 限</option>
                                    <%foreach (var p in sp.ZFPrice)
                                      { %>
                                    <option value='<%=p[0] %>'>
                                        <%=p[0] %></option>
                                    <%} %>
                                </select>元/月
                            </td>
                        </tr>
                        <tr class="dn_ sfp">
                            <td class='t'>
                                价&nbsp;&nbsp;&nbsp;&nbsp;格:
                            </td>
                            <td class='c'>
                                <select class="">
                                    <option>不 限</option>
                                    <%foreach (var p in sp.SfPrice)
                                      { %>
                                    <option value='<%=p[0] %>'>
                                        <%=p[0] %></option>
                                    <%} %>
                                </select>万元/套
                            </td>
                        </tr>
                        <tr class="ht">
                            <td class='t'>
                                选择类型:
                            </td>
                            <td class='c'>
                                <select class="">
                                    <option value="">不 限</option>
                                    <%foreach (var t in ZF.BLL.DictionaryConfig.HHouseType)
                                      { %>
                                    <option value="<%=t.Key %>">
                                        <%=t.Text %></option>
                                    <%} %>
                                </select>
                            </td>
                        </tr>
                        <tr class="m">
                            <td class='t'>
                                房&nbsp;&nbsp;&nbsp;&nbsp;型:
                            </td>
                            <td class='c'>
                                <select class="fan ">
                                    <option value="">--</option>
                                    <%for (int i = 1; i <= 5; i++)
                                      { %>
                                    <option value="<%=i %>">
                                        <%=i %></option>
                                    <%} %>
                                    <option value="6">6房以上</option>
                                </select>房<br />
                                <select class="tin ">
                                    <option value="">--</option>
                                    <%for (int i = 1; i <= 3; i++)
                                      { %>
                                    <option value="<%=i %>">
                                        <%=i %></option>
                                    <%} %>
                                    <option value="4">4厅以上</option>
                                </select>厅
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="text-align: center">
                                <input type="button" value=" 搜 索 " class="btSearch" /><a href="/house/search.aspx">高级搜索</a>
                            </td>
                        </tr>
                    </table>
                </dd>
            </dl>
        </div>

        <script>
                $(function() {

                var fysearch = $(".fysearch");
                    fysearch.find(".dt select").change(function() {
                        if (this.value == "1") {
                            fysearch.find(".zfp").show();
                            fysearch.find(".sfp").hide();
                        }
                        if (this.value == "3" || this.value == "4") {
                            fysearch.find(".sfp").show();
                            fysearch.find(".zfp").hide();
                        }
                    });

                    fysearch.find(".btSearch").click(function() {
                    var url = "/house/search.aspx?dt=" + fysearch.find(".dt select")[0].value;
                        if (fysearch.find(".dt select")[0].value == 1) {
                            if (fysearch.find(".zfp select")[0].value != "") {
                                url += "&p=" + fysearch.find(".zfp select")[0].value
                            }
                        } else {
                        if (fysearch.find(".sfp select")[0].value != "") {
                            url += "&p=" + fysearch.find(".sfp select")[0].value
                            }
                        }
                        if (fysearch.find(".area1")[0].value != "0") {
                            url += "&aid=" + fysearch.find(".area1")[0].value
                        }
                        if (fysearch.find(".area2")[0].value != "0") {
                            url += "&aid2=" + fysearch.find(".area2")[0].value
                        }
                        if (fysearch.find(".ht select")[0].value != "") {
                            url += "&ht=" + fysearch.find(".ht select")[0].value
                        }

                        if (fysearch.find(".tin")[0].value != "") {
                            url += "&tin=" + fysearch.find(".tin")[0].value
                        }
                        if (fysearch.find(".fan")[0].value != "") {
                            url += "&fan=" + fysearch.find(".fan")[0].value
                        }
                        window.location = encodeURI(url);
      
                    });

                });
        </script>

   
        <div class="wttool b1 mt5_" style="">
            <dl>
                <dt>提供广州市房产·家居服务</dt>
                <dd>
                    <a href="/service/jygh.aspx">房地产交易过户</a></dd>
                <dd>
                    <a href="/service/ajdk.aspx">按揭贷款，抵押贷款</a></dd>
                    <dd>
                    <a href="/service/oyzx.aspx">家居设计装修服务</a></dd>
                
            </dl>
            <div>
                联系电话:020-86340680<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;13312818081</div>
        </div>
    </div>
</div>
